<template>
  <main class="top">
    <div class="topbar">
        <div class="topbar-l" style="margin-right: 270px;" @click="doreport">
          <slot name="left"></slot>
        </div>
        <slot name="center"></slot>
        <div class="topbar-l" style="margin-left: 270px;" @click="domodule">
          <slot name="right"></slot>
        </div>
    </div>
  </main>
</template>

<script>
export default {

}
</script>

<style scoped>
  .top {
    width: 100%;
    height: 80px;
    border-bottom: 2px solid #2c3e50;
    background-color: #eee;
    box-sizing: border-box;
  }

  .topbar {
    min-width: 1280px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .topbar-l {
    width: auto;

    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;

    position: relative;
    cursor: pointer;

    color: #2c3e50;
    transition: 0.5s;
    opacity: 0.8;
  }

  .topbar-l:hover {
    opacity: 1;
  }

  .topbar-l::after {
    content: '';

    width: 80%;
    height: 3px;
    border-radius: 2px;

    background-color: #fffb;

    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translate(-50%);
  }

  .topbar-l:hover::after {
    animation: underline 0.8s forwards ease;
  }

  @keyframes underline {
    from {
        width: 0%;
        background-color: #2c3e50;
    }
    to {
        width: 80%;
        background-color: #030e1a;
    }
  }
</style>